home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
vbprnt20.zip
/
VB4
/
VBPRNT32.FRM
(
.txt
)
< prev
Wrap
Visual Basic Form
|
1996-05-31
|
12KB
|
348 lines
VERSION 4.00
Begin VB.Form frmMain
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "VBPrint Functions"
ClientHeight = 4230
ClientLeft = 1665
ClientTop = 3090
ClientWidth = 6240
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 4665
Left = 1605
LinkTopic = "Form1"
ScaleHeight = 4230
ScaleWidth = 6240
Top = 2715
Width = 6360
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "Printer Features"
ForeColor = &H80000008&
Height = 1695
Left = 0
TabIndex = 11
Top = 2460
Width = 6180
Begin VB.ListBox lstRes
Appearance = 0 'Flat
Height = 615
Left = 5025
TabIndex = 17
Top = 420
Width = 975
End
Begin VB.ListBox lstBins
Appearance = 0 'Flat
Height = 615
Left = 3135
TabIndex = 15
Top = 420
Width = 1785
End
Begin VB.ListBox lstPapers
Appearance = 0 'Flat
Height = 1200
Left = 135
TabIndex = 12
Top = 420
Width = 2940
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Resolutions"
ForeColor = &H80000008&
Height = 195
Index = 5
Left = 5025
TabIndex = 16
Top = 195
Width = 1005
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Paper bins"
ForeColor = &H80000008&
Height = 195
Index = 4
Left = 3120
TabIndex = 14
Top = 195
Width = 915
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Paper types"
ForeColor = &H80000008&
Height = 195
Index = 3
Left = 135
TabIndex = 13
Top = 195
Width = 1020
End
End
Begin VB.CheckBox chkDefault
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "Use Windows defaults in dialog"
ForeColor = &H80000008&
Height = 195
Left = 75
TabIndex = 5
Top = 2175
Width = 3510
End
Begin VB.CheckBox chkPerm
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "Make changes permanent"
ForeColor = &H80000008&
Height = 195
Left = 75
TabIndex = 4
Top = 1920
Width = 2910
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 6015
Top = 9670
End
Begin VB.CommandButton cmdBtn
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "E&xit"
Height = 330
Index = 2
Left = 4710
TabIndex = 3
Top = 1560
Width = 1365
End
Begin VB.CommandButton cmdBtn
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Show &Dialog"
Height = 330
Index = 1
Left = 4710
TabIndex = 2
Top = 1170
Width = 1365
End
Begin VB.CommandButton cmdBtn
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "&Set Default"
Height = 330
Index = 0
Left = 4710
TabIndex = 1
Top = 780
Width = 1365
End
Begin VB.ListBox lstPrinters
Appearance = 0 'Flat
Height = 1590
Left = 60
TabIndex = 0
Top = 255
Width = 3270
End
Begin VB.Label lblDefDriver
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BackStyle = 0 'Transparent
ForeColor = &H00FFFFFF&
Height = 195
Left = 4050
TabIndex = 10
Top = 510
Width = 1410
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Driver:"
ForeColor = &H80000008&
Height = 195
Index = 2
Left = 3420
TabIndex = 9
Top = 525
Width = 585
End
Begin VB.Label lblDefault
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BackStyle = 0 'Transparent
ForeColor = &H00FFFFFF&
Height = 195
Left = 3420
TabIndex = 8
Top = 270
Width = 2610
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Current default printer:"
ForeColor = &H80000008&
Height = 195
Index = 1
Left = 3420
TabIndex = 7
Top = 30
Width = 1935
End
Begin VB.Label Label1
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "Installed printers"
ForeColor = &H80000008&
Height = 195
Index = 0
Left = 60
TabIndex = 6
Top = 30
Width = 1425
End
Attribute VB_Name = "frmMain"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
DefInt I
DefLng L
DefStr S
Option Explicit
Dim Shared DeviceData() As DEVMODE_TYPE
Private Sub cmdBtn_Click(Index As Integer)
Dim iRet As Integer
Dim inMode As DEVMODE_TYPE
Dim outMode As DEVMODE_TYPE
Dim sTemp As String
Dim iMode As Integer
Dim sTemp2 As String
Select Case Index
Case 0
If lstPrinters.ListIndex = True Then Exit Sub
sTemp = lstPrinters.List(lstPrinters.ListIndex)
iRet = VBSetDefPrinter(sTemp)
If iRet <> True Then MsgBox "Error setting default printer", 48, "Error"
Timer1_Timer
Case 1
If lstPrinters.ListIndex = True Then Exit Sub
sTemp = lstPrinters.List(lstPrinters.ListIndex)
iMode = DM_OUT_BUFFER Or DM_IN_PROMP